//
//  SleepViewController.h
//  SleepDetective
//
//  Created by Fei Hu on 12/12/10.
//  Copyright 2010 Southern Methodist University. All rights reserved.
//

#import <UIKit/UIKit.h>
@class MMPDeepSleepPreventer;

#define kAccelerometerFrequency			30 //Hz
#define kMinThreshold		0.005
#define kMaxThreshold		0.04

@interface SleepViewController : UIViewController <UIAccelerometerDelegate,UIApplicationDelegate> {
	IBOutlet UILabel *label;
	UIAcceleration *lastAcceleration;
	BOOL histeresisExcited;

	IBOutlet UIButton *goSleepBtn;
	//Keep Active
	MMPDeepSleepPreventer *deepSleepPreventer;
	
	// button image
	UIImage *imgStart;
	UIImage *imgStop;	

	//clock
	IBOutlet UILabel* clockLabel;
	NSTimer *myTicker;

}

- (IBAction)startMonitor:(id)sender;

//- (void) runTimer;
//- (void)showActivity;

@property (nonatomic, retain) IBOutlet UILabel *label;
@property (nonatomic, retain) IBOutlet UIButton *goSleepBtn;
@property (nonatomic, retain) UIAcceleration *lastAcceleration;
@property (nonatomic, retain) MMPDeepSleepPreventer *deepSleepPreventer;
@property(nonatomic,retain)IBOutlet UIImage *imgStart;
@property(nonatomic,retain)IBOutlet UIImage *imgStop;

@end
